/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.h2t.loveplace.list;

import com.sun.lwuit.events.DataChangedListener;
import com.sun.lwuit.events.SelectionListener;
import com.sun.lwuit.list.ListModel;
import java.util.Vector;

/**
 *
 * @author PHAN THAI
 */
public class PlaceModel implements ListModel {
    private Vector players;
    private int selection;
    
    public PlaceModel(Vector players) {
        this.players = players;
    }

    public Object getItemAt(int i) {
        return players.elementAt(i % players.size());
    }

    public int getSize() {
        return players.size();
    }

    public int getSelectedIndex() {
       return selection;
    }

    public void setSelectedIndex(int i) {
        selection = i;
    }

    public void addDataChangedListener(DataChangedListener dl) {
        
    }

    public void removeDataChangedListener(DataChangedListener dl) {
        
    }

    public void addSelectionListener(SelectionListener sl) {
        
    }

    public void removeSelectionListener(SelectionListener sl) {
        
    }

    public void addItem(Object o) {
        
    }

    public void removeItem(int i) {
        
    }

}
